package com.zy.web.demo.duoxiancheng.demo5;

/**
 * @author <a href="mailto:zhouyong@cqyyt.com">zy</a>
 * @version 1.0
 * @date 2020/7/29 9:51
 * 停止线程return
 */
public class Test {

    public static void main(String[] args) {
        try {
            Thread thread = new MyThread();
            thread.start();
            thread.sleep(2000);
            thread.interrupt();
        }catch (InterruptedException e){
            e.printStackTrace();
        }
    }

}
